home *** CD-ROM | disk | FTP | other *** search
- /*--------------------------------------------------------------------------*/
- /* */
- /* */
- /* ------------ Bit-Bucket Software <no-Inc> */
- /* \ 10001101 / Writers and Distributors of */
- /* \ 011110 / No-Cost<no-tm> Software. */
- /* \ 1011 / */
- /* ------ */
- /* */
- /* Copyright (C) 1987, 1988, 1989 by Robert Hartman and Vincent Perriello */
- /* */
- /* */
- /* This module was originally written by Bob Hartman */
- /* */
- /* */
- /* BinkleyTerm Initial Fullscreen Setup */
- /* */
- /* */
- /* For complete details of the licensing restrictions, please refer */
- /* to the License agreement, which is published in its entirety in */
- /* the MAKEFILE and BT.C, and also contained in the file LICENSE.210. */
- /* */
- /* USE OF THIS FILE IS SUBJECT TO THE RESTRICTIONS CONTAINED IN THE */
- /* BINKLEYTERM LICENSING AGREEMENT. IF YOU DO NOT FIND THE TEXT OF */
- /* THIS AGREEMENT IN ANY OF THE AFOREMENTIONED FILES, OR IF YOU DO */
- /* NOT HAVE THESE FILES, YOU SHOULD IMMEDIATELY CONTACT THE AUTHORS */
- /* AT THE ADDRESSES LISTED BELOW. IN NO EVENT SHOULD YOU PROCEED TO */
- /* USE THIS FILE WITHOUT HAVING ACCEPTED THE TERMS OF THE */
- /* BINKLEYTERM LICENSING AGREEMENT, OR SUCH OTHER AGREEMENT AS YOU */
- /* ARE ABLE TO REACH WITH THE AUTHORS. */
- /* */
- /* */
- /* The Authors can be reached at the following addresses: */
- /* */
- /* Robert C. Hartman Vincent E. Perriello */
- /* Spark Software VEP Software */
- /* 427-3 Amherst Street 111 Carroll Street */
- /* CS2032, Suite 232 Naugatuck, CT 06770 */
- /* Nashua, NH 03061 */
- /* */
- /* FidoNet 1:132/101 FidoNet 1:141/491 */
- /* Data (603) 888-8179 Data (203) 729-7569 */
- /* */
- /* Please feel free to contact us at any time to share your comments */
- /* about our software and/or licensing policies. */
- /* */
- /*--------------------------------------------------------------------------*/
-
- #include <time.h>
- #include <string.h>
-
- #include "com.h"
- #include "xfer.h"
- #include "zmodem.h"
- #include "keybd.h"
- #include "sbuf.h"
- #include "sched.h"
- #include "externs.h"
- #include "prototyp.h"
-
- void b_sbinit ()
- {
- vfossil_init ();
- scr_printf ("\033[H\033[2J");
- sb_init ();
- wholewin = (REGIONP) sb_new (0, 0, 23, 80);
- settingswin = (REGIONP) sb_new (1, 1, 7, 22);
- historywin = (REGIONP) sb_new (1, 23, 7, 23);
- holdwin = (REGIONP) sb_new (1, 46, 7, 33);
- callwin = (REGIONP) sb_new (8, 1, 10, 78);
- filewin = (REGIONP) sb_new (18, 1, 4, 78);
-
- sb_fill (wholewin, ' ', colors.background);
- sb_fill (settingswin, ' ', colors.settings);
- sb_fill (historywin, ' ', colors.history);
- sb_fill (holdwin, ' ', colors.hold);
- sb_fill (callwin, ' ', colors.call);
- sb_fill (filewin, ' ', colors.file);
-
- sb_box (settingswin, boxtype, colors.settings);
- sb_box (historywin, boxtype, colors.history);
- sb_box (holdwin, boxtype, colors.hold);
- sb_box (callwin, boxtype, colors.call);
- sb_box (filewin, boxtype, colors.file);
-
- sb_move (settingswin, 0, 1);
- sb_puts (settingswin, " Current Settings ");
-
- sb_move (historywin, 0, 1);
- sb_puts (historywin, " Today at a Glance ");
-
- sb_move (holdwin, 0, 1);
- sb_puts (holdwin, " Pending Outbound Mail ");
-
- sb_move (holdwin, 3, 7);
- sb_puts (holdwin, "Initializing System");
-
- sb_move (callwin, 0, 1);
- sb_puts (callwin, " Recent Activity ");
-
- sb_move (filewin, 0, 1);
- sb_puts (filewin, " Transfer Status ");
-
- sb_move (wholewin, 0, 1);
- sprintf (junk, "Node: %d:%d/%d.%d", alias[0].Zone, boss_net, boss_node,
- (boss_net == alias[0].Net) ? 0 : alias[0].Node);
- sb_puts (wholewin, junk);
- sb_move (wholewin, 0, 79 - strlen (system_name));
- sb_puts (wholewin, system_name);
-
- bottom_line ();
-
- sb_move (settingswin, SET_EVNT_ROW, 2);
- sb_puts (settingswin, "Event:");
- sb_move (settingswin, SET_PORT_ROW, 2);
- sb_puts (settingswin, "Port: ");
- sb_move (settingswin, SET_STAT_ROW, 2);
- sb_puts (settingswin, "Status: Init");
-
- do_today ();
-
- settingswin->sr0 = settingswin->r0 + 1;
- settingswin->sr1 = settingswin->r1 - 1;
- settingswin->sc0 = settingswin->c0 + 1;
- settingswin->sc1 = settingswin->c1 - 1;
-
- historywin->sr0 = historywin->r0 + 1;
- historywin->sr1 = historywin->r1 - 1;
- historywin->sc0 = historywin->c0 + 1;
- historywin->sc1 = historywin->c1 - 1;
-
- holdwin->sr0 = holdwin->r0 + 1;
- holdwin->sr1 = holdwin->r1 - 1;
- holdwin->sc0 = holdwin->c0 + 1;
- holdwin->sc1 = holdwin->c1 - 1;
-
- callwin->sr0 = callwin->r0 + 1;
- callwin->sr1 = callwin->r1 - 1;
- callwin->sc0 = callwin->c0 + 1;
- callwin->sc1 = callwin->c1 - 1;
-
- filewin->sr0 = filewin->r0 + 1;
- filewin->sr1 = filewin->r1 - 1;
- filewin->sc0 = filewin->c0 + 1;
- filewin->sc1 = filewin->c1 - 1;
- }
-
- void do_today ()
- {
- char j[30];
-
- if (fullscreen)
- {
- sb_move (historywin, HIST_BBS_ROW, 2);
- sb_puts (historywin, "BBS/Mail: ");
- sprintf (j, "%d/%d", hist.bbs_calls, hist.mail_calls);
- sprintf (junk, "%-8.8s", j);
- sb_puts (historywin, junk);
-
- sb_move (historywin, HIST_ATT_ROW, 2);
- sb_puts (historywin, "Calls Out: ");
- sprintf (junk, "%-6d", hist.calls_made);
- sb_puts (historywin, junk);
-
- sb_move (historywin, HIST_CONN_ROW, 2);
- sb_puts (historywin, "Successes: ");
- sprintf (junk, "%-6d", hist.connects);
- sb_puts (historywin, junk);
-
- sb_move (historywin, HIST_FILE_ROW, 2);
- sb_puts (historywin, "Files I/O: ");
- sprintf (j, "%d/%d", hist.files_in, hist.files_out);
- sprintf (junk, "%-8.8s", j);
- sb_puts (historywin, junk);
-
- sb_move (historywin, HIST_LAST_ROW, 2);
- sb_puts (historywin, "Last: ");
- }
-
- last_type (hist.last_caller, hist.last_zone, hist.last_net, hist.last_node);
- }
-
- void bottom_line ()
- {
- if (fullscreen)
- {
- sb_move (wholewin, 22, 0);
- sb_putc (wholewin, ' ');
- sb_puts (wholewin, ANNOUNCE);
- #ifdef OVERLAYS
- sb_puts (wholewin, "-Overlay");
- #endif
- sb_move (wholewin, 22, 57);
- sb_puts (wholewin, "Press Alt-F10 For Help ");
- }
- }
-
- void put_up_time ()
- {
- struct tm *tp;
- time_t ltime;
-
- if (fullscreen && (un_attended || doing_poll))
- {
- time (<ime);
- tp = localtime (<ime);
- sb_move (settingswin, SET_TIME_ROW, SET_TIME_COL);
- sprintf (junk, "%s %s %02d @ %02d:%02d",
- wkday[tp->tm_wday], mtext[tp->tm_mon], tp->tm_mday,
- tp->tm_hour, tp->tm_min);
- sb_puts (settingswin, junk);
- sb_show ();
- }
- }
-